import { ThemeVarService } from '../../../lib/abstract/style/theme_var/service'

export class LinkStylesService {
  private static instance: LinkStylesService
  private readonly themeVarService: ThemeVarService = ThemeVarService.getInstance()

  static getInstance(): LinkStylesService {
    if (!LinkStylesService.instance) {
      LinkStylesService.instance = new LinkStylesService()
    }

    return LinkStylesService.instance
  }

  default(activeVisited: boolean = false): string {
    return `
border: none !important;
outline: none !important;
color: var(${this.themeVarService.link.default.text}) !important;
text-decoration: none !important;
opacity: 1 !important;
font-weight: 400 !important;
font-style: normal !important;
transition: color 0.3s;

&:hover {
  color: var(${this.themeVarService.link.default.textHover}) !important;
  text-decoration: none !important;
}

${activeVisited
    ? `&:visited {
    color: var(${this.themeVarService.link.default.textVisited}) !important;
    text-decoration: none !important;
  }`
    : ''
}
  `
  }

  get navbar(): string {
    return `
border: none !important;
outline: none !important;
color: var(${this.themeVarService.default.text.secondary}) !important;
text-decoration: none !important;
font-weight: 400 !important;
transition: color 0.3s;

&:hover {
  color: var(${this.themeVarService.navbar.default.colorHover}) !important;
}
`
  }
}
